At 21:38 +0300 on 22/06/1999, Steffen Zimmert wrote:
> I created the associated database table with the following statement:
> create table images (imgname name, imgoid oid);
>
...
> // Create PreparedStatement
> PreparedStatement ps = db.prepareStatement("Insert into database values
> (?,?)");
> ps.setString(1,"TEST");
> ps.setBytes(2,objBytes);
> ps.executeUpdate();
> ps.close();
Well, if it's defined as an oid, and you pass an array of bytes to it, it
certainly won't work. An oid is a four-byte integer, not a byte array.
Please look in the Postgres programmer documentation, in the JDBC part,
under "Postgres Extensions to the JDBC API".
There is a separate mechanism to access PostgreSQL's large object
interface, as well as the geometric types etc.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma